'core
strComputer="."
str=0
On Error Resume Next

Set objWMIService = GetObject( "winmgmts://" & strComputer & "/root/cimv2" )
If Err Then ShowError
Set colItems = objWMIService.ExecQuery("SELECT DeviceID,LoadPercentage FROM Win32_Processor", "WQL", _
                                          wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
	       Wscript.Echo  "Device ID       : " & objItem.DeviceID       
	       Wscript.Echo  "Load Percentage : " & objItem.LoadPercentage 
str = objItem.LoadPercentage + str 

		   Next
		   Wscript.Echo "total cpu usage " & Int(str/2)
WScript.Quit(0)



